//
//  BCWalletExchangeOutputDiplayView.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2019/1/21.
//  Copyright © 2019 guoshikeji. All rights reserved.
//

#import "BCWalletExchangeOutputDiplayView.h"

@implementation BCWalletExchangeOutputDiplayView

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.inputTF.enabled = false;
    }
    return self;
}
//
- (void)setToCurrency:(UserWalletExchangeDataCurrencyModel *)toCurrency {
    _toCurrency = toCurrency;
    //
    if (_toCurrency) {
        self.currencyLabel.text = _toCurrency.acronyms;
        [self.currencyLabel sizeToFit];
    }
    //
    CGFloat offset = CGRectGetWidth(self.currencyLabel.frame);
    [self.inputTF mas_updateConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(self.displayContentView).offset(-offset);
    }];
}

@end
